<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <link rel="stylesheet" href="__ROOT__/static/static_login/normalize.css">
    <link rel="stylesheet" href="__ROOT__/static/static_login/colorCtrl.css">
    <link rel="stylesheet" href="__ROOT__/static/static_login/style.css">
    <link rel="stylesheet" href="__ROOT__/static/static_login/mobiscroll.custom-2.4.4.min.css">
    <link rel="stylesheet" href="__ROOT__/static/static_login/style-dialog.css">
    <link rel="stylesheet" href="__ROOT__/static/static_login/ui-dialog.css">
    <style>
        .train_check{
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            margin-bottom: 40px;
            height: 0px;
        }
        .train_check input{
            height: 46px;
            width: 34px;
        }
        .train_check div{
            height: 40px;
            color: #000;
        }
    </style>
</head>

<body>
<div class="main" style="width: 100%">
    <div class="content" style="width: 100%;margin-top: 50px">
       <!-- <ul class="logintitUl clearfix">
            <li class="current"><a href="javascript:;">手机号登录</a></li>
            <li><a href="javascript:;">账号密码登录</a></li>
            <li class="xian"></li>
        </ul>-->
        <div class="login-account-hide">
            <div class="login-account-wc">
                <div class="login-account">
                    <ul>
                        <li class="border-bottom">
                            <p>账号</p>
                            <input  placeholder="请输入账号" id="name" style="width:320px">
                            <div style="clear: both;"></div>
                        </li>
                        <li class="border-bottom">
                            <p class="w2">密码</p>

                            <input type="password" class="userpwd" id="pwd" placeholder="请输入密码" style="width:320px">
                            <div style="clear: both;"></div>
                        </li>
                    </ul>
                </div>
                <div class="login-button">

                    <div class="train_check">
                        <input type="checkbox" id="agree" name="agree" style="vertical-align:middle;margin-left: -80px;">
                        <div style="color:#666;vertical-align:middle;line-height: 40px;width:480px;">&nbsp;勾选即视为同意

                            <a style="color: #000" href="javascript:userAgreement('http://guangdongyd.ctwenhuayun.cn/pcjq2022/setSession.html?url=http%3A%2F%2Fguangdongyd.ctwenhuayun.cn%2Fpcjq2022%2Fvote%2FworkDetail.html%3Fid%3D022adb3b9d0a4748aafd6dad347cc1fb%26voteId%3D4422def49a5740ccb22c117c9c6679b4%26idx%3D0')">《用户协议》</a>
                            <a style="color: #000" href="javascript:privateProtocol('http://guangdongyd.ctwenhuayun.cn/pcjq2022/setSession.html?url=http%3A%2F%2Fguangdongyd.ctwenhuayun.cn%2Fpcjq2022%2Fvote%2FworkDetail.html%3Fid%3D022adb3b9d0a4748aafd6dad347cc1fb%26voteId%3D4422def49a5740ccb22c117c9c6679b4%26idx%3D0')">《隐私协议》</a>
                        </div>
                    </div>

                    <button type="button" onclick="userCodeLogin();" id="codeLoginBtn" style="width:610px;margin: 0 auto;">登录</button>
                </div>
                <div class="login-zhuc"><img src="__ROOT__/static/static_login/jiant.png">我没有账号，<a href="{:url('index/index/reg')}">立即注册</a>

                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__ROOT__/static/static_list/js/jquery.min.js"></script>
<script>
    $('#codeLoginBtn').click(function () {
        var name = $('#name').val();
        var pwd = $('#pwd').val();
        if (name == '') {
            alert('请输入账号');
            return false;
        }
        if (pwd == '') {
            alert('请输入密码');
            return false;
        }
        if (!$("input[name='agree']").is(":checked")) {
            alert('请同意协议');
            return false;
        }
        $.post("{:url('index/index/loginOp')}",{'name':name,'pwd':pwd},function(result){
            if(result.code == 1){
                alert(result.msg);
                window.location.href= 'http://'+ result.data;
                return false;
            }else{
                alert(result.msg);
                return false;
            }

        },'json');
    });

</script>
</body>
</html>